3.59 \(\int x^2 (a+b \tanh ^{-1}(c x^2)) \, dx\)

Optimal. Leaf size=63 \[ \frac {1}{3} x^3 \left (a+b \tanh ^{-1}\left (c x^2\right )\right )-\frac {b \tan ^{-1}\left (\sqrt {c} x\right )}{3 c^{3/2}}-\frac {b \tanh ^{-1}\left (\sqrt {c} x\right )}{3 c^{3/2}}+\frac {2 b x}{3 c} \]

[Out]

2/3*b*x/c-1/3*b*arctan(x*c^(1/2))/c^(3/2)+1/3*x^3*(a+b*arctanh(c*x^2))-1/3*b*arctanh(x*c^(1/2))/c^(3/2)

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 63, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.357, Rules used = {6097, 321, 212, 206, 203} \[ \frac {1}{3} x^3 \left (a+b \tanh ^{-1}\left (c x^2\right )\right )-\frac {b \tan ^{-1}\left (\sqrt {c} x\right )}{3 c^{3/2}}-\frac {b \tanh ^{-1}\left (\sqrt {c} x\right )}{3 c^{3/2}}+\frac {2 b x}{3 c} \]

Antiderivative was successfully verified.

[In]

Int[x^2*(a + b*ArcTanh[c*x^2]),x]

[Out]

(2*b*x)/(3*c) - (b*ArcTan[Sqrt[c]*x])/(3*c^(3/2)) - (b*ArcTanh[Sqrt[c]*x])/(3*c^(3/2)) + (x^3*(a + b*ArcTanh[c
*x^2]))/3

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 212

Int[((a_) + (b_.)*(x_)^4)^(-1), x_Symbol] :> With[{r = Numerator[Rt[-(a/b), 2]], s = Denominator[Rt[-(a/b), 2]
]}, Dist[r/(2*a), Int[1/(r - s*x^2), x], x] + Dist[r/(2*a), Int[1/(r + s*x^2), x], x]] /; FreeQ[{a, b}, x] &&
 !GtQ[a/b, 0]

Rule 321

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(c^(n - 1)*(c*x)^(m - n + 1)*(a + b*x^n
)^(p + 1))/(b*(m + n*p + 1)), x] - Dist[(a*c^n*(m - n + 1))/(b*(m + n*p + 1)), Int[(c*x)^(m - n)*(a + b*x^n)^p
, x], x] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0] && GtQ[m, n - 1] && NeQ[m + n*p + 1, 0] && IntBinomialQ[a, b,
 c, n, m, p, x]

Rule 6097

Int[((a_.) + ArcTanh[(c_.)*(x_)^(n_)]*(b_.))*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*ArcTa
nh[c*x^n]))/(d*(m + 1)), x] - Dist[(b*c*n)/(d*(m + 1)), Int[(x^(n - 1)*(d*x)^(m + 1))/(1 - c^2*x^(2*n)), x], x
] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[m, -1]

Rubi steps

\begin {align*} \int x^2 \left (a+b \tanh ^{-1}\left (c x^2\right )\right ) \, dx &=\frac {1}{3} x^3 \left (a+b \tanh ^{-1}\left (c x^2\right )\right )-\frac {1}{3} (2 b c) \int \frac {x^4}{1-c^2 x^4} \, dx\\ &=\frac {2 b x}{3 c}+\frac {1}{3} x^3 \left (a+b \tanh ^{-1}\left (c x^2\right )\right )-\frac {(2 b) \int \frac {1}{1-c^2 x^4} \, dx}{3 c}\\ &=\frac {2 b x}{3 c}+\frac {1}{3} x^3 \left (a+b \tanh ^{-1}\left (c x^2\right )\right )-\frac {b \int \frac {1}{1-c x^2} \, dx}{3 c}-\frac {b \int \frac {1}{1+c x^2} \, dx}{3 c}\\ &=\frac {2 b x}{3 c}-\frac {b \tan ^{-1}\left (\sqrt {c} x\right )}{3 c^{3/2}}-\frac {b \tanh ^{-1}\left (\sqrt {c} x\right )}{3 c^{3/2}}+\frac {1}{3} x^3 \left (a+b \tanh ^{-1}\left (c x^2\right )\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 91, normalized size = 1.44 \[ \frac {a x^3}{3}+\frac {b \log \left (1-\sqrt {c} x\right )}{6 c^{3/2}}-\frac {b \log \left (\sqrt {c} x+1\right )}{6 c^{3/2}}-\frac {b \tan ^{-1}\left (\sqrt {c} x\right )}{3 c^{3/2}}+\frac {1}{3} b x^3 \tanh ^{-1}\left (c x^2\right )+\frac {2 b x}{3 c} \]

Antiderivative was successfully verified.

[In]

Integrate[x^2*(a + b*ArcTanh[c*x^2]),x]

[Out]

(2*b*x)/(3*c) + (a*x^3)/3 - (b*ArcTan[Sqrt[c]*x])/(3*c^(3/2)) + (b*x^3*ArcTanh[c*x^2])/3 + (b*Log[1 - Sqrt[c]*
x])/(6*c^(3/2)) - (b*Log[1 + Sqrt[c]*x])/(6*c^(3/2))

________________________________________________________________________________________

fricas [A]  time = 0.92, size = 186, normalized size = 2.95 \[ \left [\frac {b c^{2} x^{3} \log \left (-\frac {c x^{2} + 1}{c x^{2} - 1}\right ) + 2 \, a c^{2} x^{3} + 4 \, b c x - 2 \, b \sqrt {c} \arctan \left (\sqrt {c} x\right ) + b \sqrt {c} \log \left (\frac {c x^{2} - 2 \, \sqrt {c} x + 1}{c x^{2} - 1}\right )}{6 \, c^{2}}, \frac {b c^{2} x^{3} \log \left (-\frac {c x^{2} + 1}{c x^{2} - 1}\right ) + 2 \, a c^{2} x^{3} + 4 \, b c x + 2 \, b \sqrt {-c} \arctan \left (\sqrt {-c} x\right ) - b \sqrt {-c} \log \left (\frac {c x^{2} + 2 \, \sqrt {-c} x - 1}{c x^{2} + 1}\right )}{6 \, c^{2}}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(a+b*arctanh(c*x^2)),x, algorithm="fricas")

[Out]

[1/6*(b*c^2*x^3*log(-(c*x^2 + 1)/(c*x^2 - 1)) + 2*a*c^2*x^3 + 4*b*c*x - 2*b*sqrt(c)*arctan(sqrt(c)*x) + b*sqrt
(c)*log((c*x^2 - 2*sqrt(c)*x + 1)/(c*x^2 - 1)))/c^2, 1/6*(b*c^2*x^3*log(-(c*x^2 + 1)/(c*x^2 - 1)) + 2*a*c^2*x^
3 + 4*b*c*x + 2*b*sqrt(-c)*arctan(sqrt(-c)*x) - b*sqrt(-c)*log((c*x^2 + 2*sqrt(-c)*x - 1)/(c*x^2 + 1)))/c^2]

________________________________________________________________________________________

giac [A]  time = 0.30, size = 75, normalized size = 1.19 \[ -\frac {1}{3} \, b c^{5} {\left (\frac {\arctan \left (\sqrt {c} x\right )}{c^{\frac {13}{2}}} - \frac {\arctan \left (\frac {c x}{\sqrt {-c}}\right )}{\sqrt {-c} c^{6}}\right )} + \frac {1}{6} \, b x^{3} \log \left (-\frac {c x^{2} + 1}{c x^{2} - 1}\right ) + \frac {1}{3} \, a x^{3} + \frac {2 \, b x}{3 \, c} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(a+b*arctanh(c*x^2)),x, algorithm="giac")

[Out]

-1/3*b*c^5*(arctan(sqrt(c)*x)/c^(13/2) - arctan(c*x/sqrt(-c))/(sqrt(-c)*c^6)) + 1/6*b*x^3*log(-(c*x^2 + 1)/(c*
x^2 - 1)) + 1/3*a*x^3 + 2/3*b*x/c

________________________________________________________________________________________

maple [A]  time = 0.03, size = 51, normalized size = 0.81 \[ \frac {x^{3} a}{3}+\frac {b \,x^{3} \arctanh \left (c \,x^{2}\right )}{3}+\frac {2 b x}{3 c}-\frac {b \arctan \left (x \sqrt {c}\right )}{3 c^{\frac {3}{2}}}-\frac {b \arctanh \left (x \sqrt {c}\right )}{3 c^{\frac {3}{2}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*(a+b*arctanh(c*x^2)),x)

[Out]

1/3*x^3*a+1/3*b*x^3*arctanh(c*x^2)+2/3*b*x/c-1/3*b*arctan(x*c^(1/2))/c^(3/2)-1/3*b*arctanh(x*c^(1/2))/c^(3/2)

________________________________________________________________________________________

maxima [A]  time = 0.41, size = 66, normalized size = 1.05 \[ \frac {1}{3} \, a x^{3} + \frac {1}{6} \, {\left (2 \, x^{3} \operatorname {artanh}\left (c x^{2}\right ) + c {\left (\frac {4 \, x}{c^{2}} - \frac {2 \, \arctan \left (\sqrt {c} x\right )}{c^{\frac {5}{2}}} + \frac {\log \left (\frac {c x - \sqrt {c}}{c x + \sqrt {c}}\right )}{c^{\frac {5}{2}}}\right )}\right )} b \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(a+b*arctanh(c*x^2)),x, algorithm="maxima")

[Out]

1/3*a*x^3 + 1/6*(2*x^3*arctanh(c*x^2) + c*(4*x/c^2 - 2*arctan(sqrt(c)*x)/c^(5/2) + log((c*x - sqrt(c))/(c*x +
sqrt(c)))/c^(5/2)))*b

________________________________________________________________________________________

mupad [B]  time = 0.85, size = 70, normalized size = 1.11 \[ \frac {a\,x^3}{3}-\frac {b\,\mathrm {atan}\left (\sqrt {c}\,x\right )}{3\,c^{3/2}}+\frac {2\,b\,x}{3\,c}+\frac {b\,x^3\,\ln \left (c\,x^2+1\right )}{6}-\frac {b\,x^3\,\ln \left (1-c\,x^2\right )}{6}+\frac {b\,\mathrm {atan}\left (\sqrt {c}\,x\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{3\,c^{3/2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*(a + b*atanh(c*x^2)),x)

[Out]

(a*x^3)/3 - (b*atan(c^(1/2)*x))/(3*c^(3/2)) + (b*atan(c^(1/2)*x*1i)*1i)/(3*c^(3/2)) + (2*b*x)/(3*c) + (b*x^3*l
og(c*x^2 + 1))/6 - (b*x^3*log(1 - c*x^2))/6

________________________________________________________________________________________

sympy [A]  time = 8.54, size = 559, normalized size = 8.87 \[ \begin {cases} \frac {4 a c^{2} x^{3} \sqrt {\frac {1}{c}}}{12 c^{2} \sqrt {\frac {1}{c}} + 12 i c^{2} \sqrt {\frac {1}{c}}} + \frac {4 i a c^{2} x^{3} \sqrt {\frac {1}{c}}}{12 c^{2} \sqrt {\frac {1}{c}} + 12 i c^{2} \sqrt {\frac {1}{c}}} + \frac {4 b c^{2} x^{3} \sqrt {\frac {1}{c}} \operatorname {atanh}{\left (c x^{2} \right )}}{12 c^{2} \sqrt {\frac {1}{c}} + 12 i c^{2} \sqrt {\frac {1}{c}}} + \frac {4 i b c^{2} x^{3} \sqrt {\frac {1}{c}} \operatorname {atanh}{\left (c x^{2} \right )}}{12 c^{2} \sqrt {\frac {1}{c}} + 12 i c^{2} \sqrt {\frac {1}{c}}} + \frac {2 i b c^{2} \log {\left (x + i \sqrt {\frac {1}{c}} \right )}}{12 c^{4} \sqrt {\frac {1}{c}} + 12 i c^{4} \sqrt {\frac {1}{c}}} + \frac {8 b c x \sqrt {\frac {1}{c}}}{12 c^{2} \sqrt {\frac {1}{c}} + 12 i c^{2} \sqrt {\frac {1}{c}}} + \frac {8 i b c x \sqrt {\frac {1}{c}}}{12 c^{2} \sqrt {\frac {1}{c}} + 12 i c^{2} \sqrt {\frac {1}{c}}} - \frac {6 i b c \log {\left (x + i \sqrt {\frac {1}{c}} \right )}}{12 c^{3} \sqrt {\frac {1}{c}} + 12 i c^{3} \sqrt {\frac {1}{c}}} + \frac {4 i b c \log {\left (x - \sqrt {\frac {1}{c}} \right )}}{12 c^{3} \sqrt {\frac {1}{c}} + 12 i c^{3} \sqrt {\frac {1}{c}}} + \frac {4 i b c \operatorname {atanh}{\left (c x^{2} \right )}}{12 c^{3} \sqrt {\frac {1}{c}} + 12 i c^{3} \sqrt {\frac {1}{c}}} - \frac {4 b \log {\left (x - i \sqrt {\frac {1}{c}} \right )}}{12 c^{2} \sqrt {\frac {1}{c}} + 12 i c^{2} \sqrt {\frac {1}{c}}} + \frac {4 b \log {\left (x - \sqrt {\frac {1}{c}} \right )}}{12 c^{2} \sqrt {\frac {1}{c}} + 12 i c^{2} \sqrt {\frac {1}{c}}} + \frac {4 b \operatorname {atanh}{\left (c x^{2} \right )}}{12 c^{2} \sqrt {\frac {1}{c}} + 12 i c^{2} \sqrt {\frac {1}{c}}} & \text {for}\: c \neq 0 \\\frac {a x^{3}}{3} & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**2*(a+b*atanh(c*x**2)),x)

[Out]

Piecewise((4*a*c**2*x**3*sqrt(1/c)/(12*c**2*sqrt(1/c) + 12*I*c**2*sqrt(1/c)) + 4*I*a*c**2*x**3*sqrt(1/c)/(12*c
**2*sqrt(1/c) + 12*I*c**2*sqrt(1/c)) + 4*b*c**2*x**3*sqrt(1/c)*atanh(c*x**2)/(12*c**2*sqrt(1/c) + 12*I*c**2*sq
rt(1/c)) + 4*I*b*c**2*x**3*sqrt(1/c)*atanh(c*x**2)/(12*c**2*sqrt(1/c) + 12*I*c**2*sqrt(1/c)) + 2*I*b*c**2*log(
x + I*sqrt(1/c))/(12*c**4*sqrt(1/c) + 12*I*c**4*sqrt(1/c)) + 8*b*c*x*sqrt(1/c)/(12*c**2*sqrt(1/c) + 12*I*c**2*
sqrt(1/c)) + 8*I*b*c*x*sqrt(1/c)/(12*c**2*sqrt(1/c) + 12*I*c**2*sqrt(1/c)) - 6*I*b*c*log(x + I*sqrt(1/c))/(12*
c**3*sqrt(1/c) + 12*I*c**3*sqrt(1/c)) + 4*I*b*c*log(x - sqrt(1/c))/(12*c**3*sqrt(1/c) + 12*I*c**3*sqrt(1/c)) +
 4*I*b*c*atanh(c*x**2)/(12*c**3*sqrt(1/c) + 12*I*c**3*sqrt(1/c)) - 4*b*log(x - I*sqrt(1/c))/(12*c**2*sqrt(1/c)
 + 12*I*c**2*sqrt(1/c)) + 4*b*log(x - sqrt(1/c))/(12*c**2*sqrt(1/c) + 12*I*c**2*sqrt(1/c)) + 4*b*atanh(c*x**2)
/(12*c**2*sqrt(1/c) + 12*I*c**2*sqrt(1/c)), Ne(c, 0)), (a*x**3/3, True))

________________________________________________________________________________________